package com.spring.demo.springdemo.aspect;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * @Author RenPu
 * @Date 2024/2/19 10:35
 * @Version 1.0
 * @Description:
 **/

@Aspect
@Component
public class AsepctConf {


    /**
     * 此写法可以获取到方法的入参
     * @param a
     * @param b
     */
    @Before(value = "execution(public void com.spring.demo.*.Userservice.test(..)) && args(a, b)",argNames = "a,b")
    public void zhouyuBefore(String a,String b) {
        System.out.println(a);
        System.out.println(b);
        System.out.println("zhouyuBefore");
    }


}
